package cn.com.nes.mybatis.agent.ope.mapper;

import cn.com.nes.mybatis.agent.ope.entity.AStandardDataItem;
import cn.com.nes.site.entity.dto.GetStandardDataItemsDTO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 协议标准项配置 Mapper 接口
 * </p>
 *
 * @author nes
 * @since 2023-03-24
 */
public interface AStandardDataItemMapper extends BaseMapper<AStandardDataItem> {

    List<AStandardDataItem> selectSetTempControlParams(@Param("protocolId") String protocolId);

    LinkedList<GetStandardDataItemsDTO> getStandardDataItems(@Param("manufacturerId") String manufacturerId,
                                                             @Param("protocolId") String protocolId,
                                                             @Param("protocolName") String protocolName);

    String getStandardSwitchCode(@Param("protocolId") String protocolId,
                                                    @Param("fieldNames") Collection<String> newFields);

    List<Map<String, Object>> getStandardFunctionOrignalInfo(String protocolId);

    List<Map<String, Object>> getStandardDataItemTemplate(String protocolId);

    String getStandardTemplate(@Param("protocolId") String protocolId, @Param("dataItemId")String dataItemId);
}
